import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';

export default defineConfig({
	plugins: [
		'@/plugins/view-ui',
		'@/plugins/le-markdown-editor',
		vue(),
		AutoImport({
			imports: ['vue', 'vue-router'], //自动导入 Vue 和 vue-router 相关函数
			resolvers: [ElementPlusResolver()],
		}), //自动引入所需函数，无需import
		Components({
			imports: ['vue', 'vue-router'], //自动导入 Vue 和 vue-router 相关组件
			resolvers: [ElementPlusResolver()],
		}), //自动引入组件，无需import
	],
});
